package com.eco.fanliapp.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.eco.fanliapp.dao.AppGoodsShopdrsMapper;
import com.eco.fanliapp.entity.AppGoodsShopdrs;
import com.eco.fanliapp.service.IAppGoodsShopdrsService;
import com.eco.fanliapp.utils.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 图文详情 服务层实现
 * 
 * @author xiaoxx
 * @date 2019-05-07
 */
@Service
public class AppGoodsShopdrsServiceImpl extends ServiceImpl<AppGoodsShopdrsMapper, AppGoodsShopdrs> implements IAppGoodsShopdrsService
{
	@Autowired
	private AppGoodsShopdrsMapper appGoodsShopdrsMapper;

	/**
     * 查询图文详情信息
     * 
     * @param tableId 图文详情ID
     * @return 图文详情信息
     */
    @Override
	public AppGoodsShopdrs selectAppGoodsShopdrsById(Long tableId)
	{
	    return appGoodsShopdrsMapper.selectAppGoodsShopdrsById(tableId);
	}
	
	/**
     * 查询图文详情列表
     * 
     * @param appGoodsShopdrs 图文详情信息
     * @return 图文详情集合
     */
	@Override
	public List<AppGoodsShopdrs> selectAppGoodsShopdrsList(AppGoodsShopdrs appGoodsShopdrs)
	{
	    return appGoodsShopdrsMapper.selectAppGoodsShopdrsList(appGoodsShopdrs);
	}
	
    /**
     * 新增图文详情
     * 
     * @param appGoodsShopdrs 图文详情信息
     * @return 结果
     */
	@Override
	public int insertAppGoodsShopdrs(AppGoodsShopdrs appGoodsShopdrs)
	{
		appGoodsShopdrs.setTableCreateTime(System.currentTimeMillis());
		appGoodsShopdrs.setTableUpdateTime(System.currentTimeMillis());
	    return appGoodsShopdrsMapper.insertAppGoodsShopdrs(appGoodsShopdrs);
	}
	
	/**
     * 修改图文详情
     * 
     * @param appGoodsShopdrs 图文详情信息
     * @return 结果
     */
	@Override
	public int updateAppGoodsShopdrs(AppGoodsShopdrs appGoodsShopdrs)
	{
		appGoodsShopdrs.setTableUpdateTime(System.currentTimeMillis());
	    return appGoodsShopdrsMapper.updateAppGoodsShopdrs(appGoodsShopdrs);
	}

	/**
     * 删除图文详情对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteAppGoodsShopdrsByIds(String ids)
	{
		return appGoodsShopdrsMapper.deleteAppGoodsShopdrsByIds(Convert.toStrArray(ids));
	}

	@Override
	public AppGoodsShopdrs selectAppGoodsShopdrsByShopId(String shopid) {
		// TODO Auto-generated method stub
		return appGoodsShopdrsMapper.selectAppGoodsShopdrsByShopId(shopid);
	}
	
}
